package com.vf.admin.client.dao;


import com.vf.admin.common.db.BaseDao;
import com.vf.admin.miaodong.entity.AlipayConfigs;
import com.vf.admin.miaodong.entity.WechatPayConfigs;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>Title : </p>
 * <p>Description : </p>
 * <p>DevelopTools : IDEA</p>
 * <p>DevelopSystem : Windows10</p>
 *
 * @Author : NemoMeng
 * @Date 2023/6/26 11:28
 */
@Repository
public class WechatPayConfigsDao extends BaseDao<WechatPayConfigs> {



    public List<WechatPayConfigs> list() {

        ArrayList<Object> paramList = new ArrayList<Object>();
        StringBuilder sbStr = new StringBuilder("select * from wechat_pay_configs");
        String sql = sbStr.toString();
        return this.queryList(sql, paramList, WechatPayConfigs.class);
    }

    public WechatPayConfigs getAppIdInfo(String appIdStr) {
        List<Object> paramList = new ArrayList<Object>();
        StringBuilder sbStr = new StringBuilder("select * from wechat_pay_configs where appId = ?");
        paramList.add(appIdStr);
        String sql = sbStr.toString();
        return this.queryObj(sql, paramList, WechatPayConfigs.class);
    }
}
